import request from '@/utils/request'

// 查询用户账号表列表
export function listUsers(query) {
  return request({
    // url: '/service/users/list',
    url: '/PC/userControl/getUserList',
    method: 'get',
    params: query
  })
}
//获取用户锁定原因
export function getLockReason(query) {
  return request({
    url: '/PC/userControl/getLockReason',
    method: 'get',
    params: query
  })
}
//获取用户详情方法
export function getUserDetail(query) {
  return request({
    url: '/PC/userControl/getUserDetail',
    method: 'get',
    params: query
  })
}
//用户锁定  post 用data
export function userLock(query) {
  return request({
    url: '/PC/userControl/userLock',
    method: 'post',
    data: query
  })
}
//用户解锁
export function userUnlock(query) {
  return request({
    url: '/PC/userControl/userUnlock',
    method: 'post',
    data: query
  })
}

// 查询用户账号表详细
export function getUsers(usersId) {
  return request({
    url: '/service/users/' + usersId,
    method: 'get'
  })
}

// 新增用户账号表
export function addUsers(data) {
  return request({
    url: '/service/users',
    method: 'post',
    data: data
  })
}

// 修改用户账号表
export function updateUsers(data) {
  return request({
    url: '/service/users',
    method: 'put',
    data: data
  })
}

// 删除用户账号表
export function delUsers(usersId) {
  return request({
    url: '/service/users/' + usersId,
    method: 'delete'
  })
}
